package gui;

import java.awt.BorderLayout;
import java.awt.Color;

import javax.swing.JPanel;
import javax.swing.JFrame;
import javax.swing.JRootPane;

import java.awt.Dimension;
import javax.swing.JLabel;
import java.awt.Rectangle;
import java.io.File;

import javax.swing.JRadioButton;
import javax.swing.ImageIcon;
import javax.swing.JButton;

import code.Settings;

public class Encryptiongui extends JPanel {
	
	Color c= new Color(0x80, 0x80, 0xFF);

	private static final long serialVersionUID = 1L;

	ATOCOmain atocoframe= null;

	private JLabel jLabel = null;

	private JLabel help = null;

	private JLabel help1 = null;

	private JButton jButton = null;

	private JButton jButton1 = null;

	private JLabel jLabel1 = null;

	private JLabel jLabel2 = null;
	private Settings s;

	/**
	 * This is the default constructor
	 */
	public Encryptiongui(ATOCOmain atocoframe) {
		super();
		initialize();
		this.atocoframe=atocoframe;
	   
	    //this.getRootPane().setWindowDecorationStyle(JRootPane.PLAIN_DIALOG);
	}

	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize() {
		
		s = new Settings();
		
		jLabel2 = new JLabel(new ImageIcon((String) s.global.get("installPath") + File.separator + "images/en/filesenc.gif"));
		jLabel2.setBounds(new Rectangle(23, 161, 55, 53));
		jLabel2.setText("");
	
		jLabel1 = new JLabel(new ImageIcon((String) s.global.get("installPath") + File.separator + "images/en/resimenc.gif"));
		jLabel1.setBounds(new Rectangle(23, 98, 55, 53));
		jLabel1.setText("");
		help1 = new JLabel();
		help1.setBounds(new Rectangle(238, 176, 31, 23));
		help1.setText("");
		help1.setIcon(new ImageIcon((String) s.global.get("installPath") + File.separator + "images/en/questionmark.jpg", ""));
		help = new JLabel();
		help.setBounds(new Rectangle(239, 114, 32, 27));
		help.setText("");
		help.setIcon(new ImageIcon((String) s.global.get("installPath") + File.separator + "images/en/questionmark.jpg", ""));
		jLabel = new JLabel();
		jLabel.setBounds(new Rectangle(21, 30, 312, 34));
		jLabel.setText("Please select type of encryption you want to use :");
		
		this.setLayout(null);
		this.add(jLabel, null);
		this.add(help, null);
		this.add(help1, null);
		this.setBackground(Color.WHITE);
		this.add(getJButton(), null);
		this.add(getJButton1(), null);
		this.add(jLabel1, null);
		this.add(jLabel2, null);
		
				
		
	}

	/**
	 * This method initializes jContentPane
	 * 
	 * @return javax.swing.JPanel
	 */
	

	/**
	 * This method initializes jButton	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButton() {
		if (jButton == null) {
			jButton = new JButton("Picture Encryption");
			jButton.setBounds(new Rectangle(85, 106, 147, 39));
		}
		return jButton;
	}

	/**
	 * This method initializes jButton1	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButton1() {
		if (jButton1 == null) {
			jButton1 = new JButton("File Encryption");
			jButton1.setBounds(new Rectangle(86, 170, 146, 37));
			jButton1.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					System.out.println("what the hell tooo");
					atocoframe.contentPane(new FileEncryption(atocoframe));
					
					System.out.println("what the hell");
				}
			});
		}
		return jButton1;
	}

}  //  @jve:decl-index=0:visual-constraint="10,10"
